package com.jwsoft.manager.core.task.jhjy;

import com.alibaba.fastjson.JSON;
import com.jwsoft.manager.common.vo.common.AreaControlVO;
import com.jwsoft.manager.core.integration.EduSyncDyDeleteIntegration;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 金华报名取消数据同步
 *
 * @author chenzh
 */
@Component
@Slf4j
public class QxBmTaskJob {
    @Autowired
    EduSyncDyDeleteIntegration eduSyncDyDeleteIntegration;

    @XxlJob("syncJhjyBmQxData")
    public void jhjyBmQxJobHandler() {
        XxlJobHelper.log("XXL-JOB, syncJhjyBmQxData");
        String str = XxlJobHelper.getJobParam();
        AreaControlVO vo = JSON.parseObject(str, AreaControlVO.class);
        ;
        log.info("金华教育金华报名取消数据同步开始");
        eduSyncDyDeleteIntegration.eduJhjyDelSync(vo);
        log.info("金华教育金华报名取消数据同步结束");
    }
}
